import com.alibaba.fastjson2.JSONPath

fun main() {
    val a = """
        {
        	"bid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
        	"data": {
        		"fly_to_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
        		"planned_path_points": [
        			{
        				"height": 123.234,
        				"latitude": 13.23,
        				"longitude": 123.234
        			}
        		],
        		"remaining_distance": 0,
        		"remaining_time": 0,
        		"result": 0,
        		"status": "wayline_progress",
        		"way_point_index": 0
        	},
        	"need_reply": 1,
        	"tid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx",
        	"timestamp": 16540709686556,
        	"method": "fly_to_point_progress"
        }
    """.trimIndent()

    val regex = """"method"\s*:\s*"(.+?)"""".toRegex()
    val matchResult = regex.find(a)

    val method = matchResult?.groups?.get(1)?.value
    if (method != null) {
        println("Method: $method")
    } else {
        println("Method field not found.")
    }
}